Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
useThrottletouseDebounce, the name the hook now has inpackages/utils. This fixes TS2305 and the api test failures.formatDatenow gives en-AU day/month/year with no leading zero on the day and a 2-digit month (e.g.1/03/2024), which is what the test expects. It is built fromformatToPartswith a single helper.setSortDir(prev => ...), so it can't read a stale value.aria-labelthrough to the button, and logs a warning outside production builds when an icon-only button has no label (WCAG 2.2 SC 4.1.2).environment = "happy-dom"withpreloadofpackages/ui/test/setup.ts. This fixes thedocument is not definederrors."types": ["bun-types"](already a devDependency) so thatbun:testtypes resolve.Verification
bun test: 13 pass, 0 fail.tsc --noEmitexits 0.Assumptions and notes
aria-labelleft out, an icon-only Button still getsaria-label="", because one test only checks that the attribute exists. An empty label gives screen readers no name, so the new warning flags this to developers. Making the prop required would mean changing the tests.01/03/2024→1/03/2024), and this format reaches the web app through theapi.tsre-export.bunfig.toml's preload path is relative to the repo root, so tests must be run from there.